//用户相关的接口
import request from '@/utils/request'
import type { loginForm, responseData } from './type'
//统一管理接口
enum API {
  LOGIN_URL = '/employee/login',
  USER_INFO = '/employee/',
  LOGOUT_URL = '/employee/logout',
}
//暴露请求函数
//登录接口方法
export const reqLogin = (data: loginForm) =>
  request.post<any, responseData>(API.LOGIN_URL, data)

//获取信息
export const reqUserInfo = (id: any) =>
  request.get<any, responseData>(API.USER_INFO + id)
//登出
export const reqLogout = () => request.post<any, responseData>(API.LOGOUT_URL)
